Setting synchronous console ensures that any printk hits the buffer
immediately and that any outstanding queued log messages are flushed. This
ensures that such log messages are not being printed while the secondary CPU
may be using early_printk during early bringup.
Signed-of-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Cc: Keir Fraser <keir@xen.org>
#include <xen/softirq.h>
#include <xen/timer.h>
#include <xen/irq.h>
+#include <xen/console.h>
#include <asm/gic.h>
cpumask_t cpu_online_map;
if ( rc < 0 )
return rc;
+ console_start_sync(); /* Secondary may use early_printk */
+
/* Tell the remote CPU which stack to boot on. */
init_data.stack = idle_vcpu[cpu]->arch.stack;
rc = arch_cpu_up(cpu);
+ console_end_sync();
+
if ( rc < 0 )
{
printk("Failed to bring up CPU%d\n", cpu);